<?
require("page.inc");
require("database.inc");
$con=new mysqli($lu_host,$lu_user,$lu_psw,$lu_db);
$isbn=$_GET['isbn'];
//echo $isbn;

$selectstr="select title,isbn,author,price from books where isbn='".$isbn."'";
//echo $selectstr;
$result=$con->query($selectstr);
if(!$result){
	$deletebook=new page;
	$deletebook->content="Select False.";
	$deletebook->display();
	$deletebook->displayfooter();
	exit;
	}
$row=$result->fetch_assoc();
//echo "<meta http-equiv=\"Refresh\" content=\"0\"; url=\"managebook.php\">"; 
//header("Location:managebook.php"); 
$editbook=new page2();
$editbook->display();
?>
<style type="text/css">
.editbook tr td{
	background-color:#FFF;
}
</style>

<h1><font color="#333333">Edit The Book</font></h1>
<form action="editto.php" method="post" >
<table border="0" cellpadding="1" align="center" cellspacing="30px" class="editbook">
<tr>
	<td>ISBN:</td>
    <td><input name="isbn"  size="40" value="<? echo $row['isbn'];?>" readonly="readonly"/></td>
</tr>
<tr>
	<td>Author:</td>
    <td><input name="author" size="40" value="<? echo $row['author'];?>"/></td>
</tr>
<tr>
    <td>Title:</td>
    <td><input name="title" size="50" value="<? echo $row['title'];?>"/></td>
</tr>
<tr>
    <td>Price($):</td>
    <td><input name="price" size="10" value="<? echo $row['price'];?>"/></td>
</tr>
<tr>
<td colspan="2"><input type="submit" name="update" value="Update"></td>
</tr>
</table>
</form>

<?
$result->free();
$con->close();
$editbook->displayfooter();
?>

